package com.codingInn.web.handler;

import com.codingInn.web.controller.GoController;
import com.codingInn.web.controller.MaiDiguaController;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerExecutionChain;
import org.springframework.web.servlet.HandlerMapping;

import javax.servlet.http.HttpServletRequest;

@Order(0)
//@Component
public class DiguaHandleMapping implements HandlerMapping {
	@Override
	public HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception {
		String url = request.getRequestURI().toString();
		String method = request.getMethod();
		if(url.endsWith("/tudou")){
			return new HandlerExecutionChain(new MaiDiguaController());
		}

		return null;
	}
}
